<?php
/* This file is part of a copyrighted work; it is distributed with NO WARRANTY.
 * See the file COPYRIGHT.html for more details.
 */

  require_once("../functions/inputFuncs.php");
  require_once('../classes/DmQuery.php');
  $dmQ = new DmQuery();
  $dmQ->connect();
  $turnoDm = $dmQ->getAssoc('turno_dm');
  $fields = array(
  	"sectionFldsYear" => inputField('text', "year", $section->getYear()),
    "sectionFldsName" => inputField('text', "name", $section->getName()),
  	"sectionFldsTurno" => inputField('select', "turnoid", $section->getTurnoId(), NULL, $turnoDm),
    "sectionFldsStudents" => inputField('text', "students", $section->getStudents()),
  	"sectionFldsApply" => inputField('checkbox', "apply", $section->getApply(), NULL, "S"),
  	"sectionFldsClaveOne" => inputField('text', "claveone", $section->getClaveOne()),
  );
  
?>

<table class="primary">
  <tr>
    <th colspan="2" valign="top" nowrap="yes" align="left">
      <?php echo H($headerWording);?> <?php echo $loc->getText("sectionFldsHeader"); ?>
    </td>
  </tr>
<?php
  foreach ($fields as $title => $html) {
?>
  <tr>
    <td nowrap="true" class="primary" valign="top">
      <?php echo $loc->getText($title); ?>
    </td>
    <td valign="top" class="primary">
      <?php echo $html; ?>
    </td>
  </tr>
<?php
  }
?>
  <tr>
    <td align="center" colspan="2" class="primary">
      <input type="submit" value="<?php echo $loc->getText("sectionFldsSubmit"); ?>" class="button">
      <input type="button" onClick="self.location='<?php echo H(addslashes($cancelLocation));?>'" value="<?php echo $loc->getText("sectionFldsCancel"); ?>" class="button">
    </td>
  </tr>

</table>
